import _ from "lodash";

export const Start = _.debounce((textDom: any, btnDom: any) => {

  let textDomB = textDom
  let btnDomB = btnDom

  if (textDomB?.classList.contains('text_box1')) {
    textDomB?.classList.remove('text_box1')
  }
  if (btnDomB?.classList.contains('btn_box1')) {
    btnDomB?.classList.remove('btn_box1')
  }
  textDomB?.classList.add('text_box')

  setTimeout(() => {
    btnDomB?.classList.add('btn_box')
  }, 100)
}, )
// }, 100)

export const End = _.debounce((textDom: any, btnDom: any) => {

  let textDomB = textDom
  let btnDomB = btnDom

  if (btnDomB?.classList.contains('btn_box')) {
    
    btnDomB?.classList.remove('btn_box')
  }

  setTimeout(() => {
    if (textDomB?.classList.contains('text_box')) {
      textDomB?.classList.remove('text_box')
    }
    textDomB?.classList.add('text_box1')
  }, 100)

  btnDomB?.classList.add('btn_box1')
}, )
// }, 100)
